<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
  <head>
    <meta charset="utf-8" />
    <meta name="generator" content="pandoc" />
    <meta
      name="viewport"
      content="width=device-width, initial-scale=1.0, user-scalable=yes"
    />
    <title>step_2</title>
    <style type="text/css">
      code {
        white-space: pre-wrap;
      }
      span.smallcaps {
        font-variant: small-caps;
      }
      span.underline {
        text-decoration: underline;
      }
      div.column {
        display: inline-block;
        vertical-align: top;
        width: 50%;
      }
    </style>
  </head>
  <body>
    <h2
      id="step-2-create-a-variable-which-is-a-whole-number-compute-the-square-and-cube-of-it"
    >
      Step 2: Create a variable which is a whole number, compute the square and
      cube of it
    </h2>
    <pre><code>&gt;&gt;&gt; num = 4
&gt;&gt;&gt; sqr = num * num
&gt;&gt;&gt; sqr
16
&gt;&gt;&gt; cube = num * num * num
&gt;&gt;&gt; cube
64
&gt;&gt;&gt; # A better way to do this
&gt;&gt;&gt; num ** 2
16
&gt;&gt;&gt; num ** 3
64
&gt;&gt;&gt;</code></pre>
  </body>
</html>
